<div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url('admini')?>">首页</a>
        <span class="crumb-step">&gt;</span><a class="crumb-name" href="<?=site_url('admini/goods')?>">商品管理</a></span>
        <span class="crumb-step">&gt;</span><span class="crumb-name">商品属性（一）</span>
    </div>
</div>

<div class="search-wrap">
    <div class="search-content">
        <table class="search-tab" id="goods_menu">
            
        </table>
    </div>
</div>

<div class="result-wrap">
    <div class="result-content">
        <form action="<?=site_url('admini/value/editvalue')?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
            <table class="insert-tab" width="100%">
                <tbody>
                <?php foreach($att_list as $k => $v): ?>
                    <tr style="background-color: #e5e5e5;">
                        <td align="center" colspan=2><?=$v['aname']?></td>
                    </tr>
                    <?php foreach($v['tree'] as $key => $value):?>
                        <tr>
                            <th width="200"><i class="require-red">*</i><?=$value['aname']?>：</th>
                            <td>
                                <input class="common-text required" id="title" name="value[<?=$val_list[$value['id']]['id']?>]" size="50" value="<?=$val_list[$value['id']]['value']?>" type="text">
                                <span style="margin-left: 10px"><?=$value['describe']?></span>
                            </td>
                        </tr>
                    <?php endforeach;?>
                <?php endforeach;?>
                <tr>
                    <th></th>
                    <td>
                        
                        
                        <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                        <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                        <span>有<i class="require-red">*</i>符号的为必填项</span>
                    </td>
                </tr>
                </tbody></table>
        </form>
    </div>
</div>
<script>
//加载菜单
$.get("<?=site_url('admini/widget/goods_menu?menu=3&gid='.$gid)?>",function(data){
    $("#goods_menu").html(data);
},'text');

//ajax提交
$('#myform').submit(function() {
    $(this).ajaxSubmit(function(data){
        if(data == 1){
            layer.alert('更新商品属性（一）成功!',{
                icon:1,
            });
        }else{
            layer.alert(data,{
                icon:2,
            });
        }
    })
    return false;
})
</script>